call "C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\vcvarsall.bat"

echo on

msbuild "Granite Commons VS11.sln" /t:clean /p:Configuration=Debug
msbuild "Granite Commons VS11.sln" /t:clean /p:Configuration=Debug-Fast
msbuild "Granite Commons VS11.sln" /t:clean /p:Configuration=Release
msbuild "Granite Commons VS11.sln" /t:rebuild /p:Configuration=Release

pause

rd "Build" /s /q
md "Build"

md Build\lib\net40
md Build\lib\net40\CodeContracts
md Build\lib\net45
md Build\lib\net45\CodeContracts
md Build\lib\sl5
md Build\lib\sl5\CodeContracts

copy Granite.Commons.net45\bin\Release\*.dll Build\lib\net40
copy Granite.Commons.net45\bin\Release\*.pdb Build\lib\net40
copy Granite.Commons.net45\bin\Release\*.xml Build\lib\net40

copy Granite.Commons.net45\bin\Release\CodeContracts\*.dll Build\lib\net40\CodeContracts
copy Granite.Commons.net45\bin\Release\CodeContracts\*.pdb Build\lib\net40\CodeContracts
copy Granite.Commons.net45\bin\Release\CodeContracts\*.xml Build\lib\net40\CodeContracts

copy Granite.Commons.net40\bin\Release\*.dll Build\lib\net40
copy Granite.Commons.net40\bin\Release\*.pdb Build\lib\net40
copy Granite.Commons.net40\bin\Release\*.xml Build\lib\net40

copy Granite.Commons.net40\bin\Release\CodeContracts\*.dll Build\lib\net40\CodeContracts
copy Granite.Commons.net40\bin\Release\CodeContracts\*.pdb Build\lib\net40\CodeContracts
copy Granite.Commons.net40\bin\Release\CodeContracts\*.xml Build\lib\net40\CodeContracts

copy Granite.Commons.sl5\bin\Release\*.dll Build\lib\sl5
copy Granite.Commons.sl5\bin\Release\*.pdb Build\lib\sl5
copy Granite.Commons.sl5\bin\Release\*.xml Build\lib\sl5

copy Granite.Commons.sl5\bin\Release\CodeContracts\*.dll Build\lib\sl5\CodeContracts
copy Granite.Commons.sl5\bin\Release\CodeContracts\*.pdb Build\lib\sl5\CodeContracts
copy Granite.Commons.sl5\bin\Release\CodeContracts\*.xml Build\lib\sl5\CodeContracts

copy Granite.Commons.nuspec Build

cd Build
del *.CodeAnalysisLog.xml /s

notepad Granite.Commons.nuspec

echo Press Enter after fixing build number

pause


NuGet pack Granite.Commons.nuspec

